/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package sopra09.lv6659438.logik.awfUnabhaengigeKomponenten;

import javax.interceptor.AroundInvoke;
import javax.interceptor.InvocationContext;

/**
 * Looging-Interceptor für die geamte Buisinesslogik des Systems. Loggt den Eintritt
 * in alle Buisinessmethoden der Anwendungslogik.
 * @author TJ
 */
public class LoggingInterceptor {
    @AroundInvoke
    public Object logMethodEntry(InvocationContext invocationContext)
            throws Exception {
        System.out.println("Entering method: " +
                invocationContext.getMethod().getName() +
                " from EJB class: " + invocationContext.getTarget());
        return invocationContext.proceed();
    }
}
